{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 169,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/opt/conda/lib/python3.7/site-packages/qiskit/providers/ibmq/ibmqfactory.py:192: UserWarning: Timestamps in IBMQ backend properties, jobs, and job results are all now in local time instead of UTC.\n",
      "  warnings.warn('Timestamps in IBMQ backend properties, jobs, and job results '\n",
      "ibmqfactory.load_account:WARNING:2020-09-11 00:34:47,918: Credentials are already in use. The existing account in the session will be replaced.\n"
     ]
    }
   ],
   "source": [
    "%matplotlib inline\n",
    "# Importing standard Qiskit libraries and configuring account\n",
    "from qiskit import QuantumCircuit, execute, Aer, IBMQ\n",
    "from qiskit.compiler import transpile, assemble\n",
    "from qiskit.tools.jupyter import *\n",
    "from qiskit.visualization import *\n",
    "# Loading your IBM Q account(s)\n",
    "provider = IBMQ.load_account()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Chapter 7 - Introduction to Qiskit"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 171,
   "metadata": {},
   "outputs": [],
   "source": [
    "from qiskit import QuantumCircuit, QuantumRegister\n",
    "from qiskit import Aer, execute\n",
    "from qiskit.providers.aer import QasmSimulator, StatevectorSimulator\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 172,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[[ 0.70710678+0.00000000e+00j  0.70710678-8.65956056e-17j]\n",
      " [ 0.70710678+0.00000000e+00j -0.70710678+8.65956056e-17j]]\n"
     ]
    }
   ],
   "source": [
    "# Create a quantum circuit with 1 qubit, add an H gate\n",
    "qc = QuantumCircuit(1)\n",
    "qc.h(0)\n",
    "# Set backend to unitary simulator\n",
    "simulator = Aer.get_backend('unitary_simulator')\n",
    "# Execute on unitary simulator\n",
    "result = execute(qc, simulator).result()\n",
    "# Obtain results and print it out on console\n",
    "unitaryState = result.get_unitary(qc)\n",
    "print(unitaryState)\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Setup IBMQ Account info on local machine "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from qiskit import IBMQ\n",
    "IBMQ.save_account(‘PASTE-API-TOKEN-HERE’)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 177,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "ibmqfactory.load_account:WARNING:2020-09-11 00:39:28,370: Credentials are already in use. The existing account in the session will be replaced.\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Job Status: job has successfully run\n"
     ]
    }
   ],
   "source": [
    "from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister, execute\n",
    "from qiskit.tools.monitor import job_monitor\n",
    "\n",
    "#You only need to load your account ONCE for each notebook. \n",
    "IBMQ.load_account()\n",
    "\n",
    "q = QuantumRegister(1)\n",
    "c = ClassicalRegister(1)\n",
    "qc = QuantumCircuit(q,c)\n",
    "qc.h(0)\n",
    "qc.measure([0],[0])\n",
    "# Specify a backend from the list available to you, \n",
    "# In this example we will use ibmq_’valencia’\n",
    "backend = provider.get_backend('ibmq_valencia')\n",
    "job_object = execute(qc, backend)\n",
    "job_monitor(job_object)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 178,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAc0AAAE1CAYAAACFhLtpAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/d3fzzAAAACXBIWXMAAAsTAAALEwEAmpwYAAAf+ElEQVR4nO3df5xV9X3n8ddHpo4kQAMYIAwYQIEK6CCOmYwhYLNStmbDNjEbY9qahKqb2GgTm92kW7XRpDFb20SNzaYhfVSlNrHGbeOaGrF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GxsPtc2bNw+AZ555hscee4w//MM/5JVXXjm0/L777uPpp5/m6aefZtiwYd2/MccxQ/MkVlNTw1133cXs2bM5++yzed/73sfkyZO56aabeOihhwC48847mTx5MvX19dx5553cfffdAAwZMoQbb7yRCy64gAsuuICbbrqJIUOG0NrayuzZszn33HOZOnUqdXV1XHXVVb24ldKJoejEvRtvvJFPfepTnHbaaYfaVq9ezTve8Q4Ahg0bxhve8IZDe6GqjJecnOQuueQSLrnkkle13XLLLYee33rrrdx6662drjt37lzmzp37qrbXv/71hw7hSqqezibfNTc3v6rP8uXL2bhxI+985zu57bbbDrXX19fz0EMPcfnll7Nx40aWLVvGxo0bectb3gKUJu7169ePSy+9lBtuuIGI6JmNOg4ZmpJ0AnjllVe4/vrrDx0Nam/u3Lk8++yzNDQ08OY3v5kLL7yQfv36AaVDs3V1dezZs4dLL72U+fPnc8UVV/Rw9ccPD89K0nHgSBP39uzZw8qVK7nooosYM2YM3//+95kzZw4tLS3U1NTwpS99iaeffppvf/vb/PznP2fChAmHxgUn7hVlaErSceBIE/d+9Vd/lR07drBhwwY2bNjAW9/6Vh566CEaGhp48cUX+eUvfwnAY489Rk1NDZMmTXLi3lHw8KwkHQfaT9xra2tj7ty5hybuNTQ0vGbme3vbt29n9uzZnHLKKdTV1R26dvrgxL2XX36ZtrY2Lr74YifuHUGczHdraWhoSGeQSZLai4hlmdnpzbM9PCtJUkGGpiRJBRmakiQVZGhKklSQoSlJUkGGpiRJBRmakiQV5M0NquCq23u7AnWHeR/v7Qok9TXuaUqSVJChKUlSQYamJEkFGZqSJBXkRCBJJx0n752YemLynnuakiQVZGhKklSQoSlJUkGGpiRJBRmakiQVZGhKklSQoSlJUkGGpiRJBRmakiQVZGhKklSQoSlJUkGGpiRJBRmakiQVZGhKklRQj4dmRFwTEesj4qWIWBYRby+43vSIOBARKzu0fygispPHad2zBZKkk1WPhmZEXAbcAXweOA94CngkIs44wnqDgXuB73XR5UXgTe0fmflSteqWJAl6fk/zeuDuzJyXm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QmCC\n",
      "text/plain": [
       "<Figure size 504x360 with 1 Axes>"
      ]
     },
     "execution_count": 178,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from qiskit.visualization import plot_histogram\n",
    "result = job_object.result()\n",
    "counts = result.get_counts(qc)\n",
    "plot_histogram(counts)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 179,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<h3>Version Information</h3><table><tr><th>Qiskit Software</th><th>Version</th></tr><tr><td>Qiskit</td><td>0.20.1</td></tr><tr><td>Terra</td><td>0.15.2</td></tr><tr><td>Aer</td><td>0.6.1</td></tr><tr><td>Ignis</td><td>0.4.0</td></tr><tr><td>Aqua</td><td>0.7.5</td></tr><tr><td>IBM Q Provider</td><td>0.8.0</td></tr><tr><th>System information</th></tr><tr><td>Python</td><td>3.7.8 | packaged by conda-forge | (default, Jul 31 2020, 02:25:08) \n",
       "[GCC 7.5.0]</td></tr><tr><td>OS</td><td>Linux</td></tr><tr><td>CPUs</td><td>8</td></tr><tr><td>Memory (Gb)</td><td>31.40900421142578</td></tr><tr><td colspan='2'>Fri Sep 11 00:42:26 2020 UTC</td></tr></table>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "import qiskit.tools.jupyter\n",
    "%qiskit_version_table"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.8"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
